using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using System.Data;
using System.Windows.Forms;
namespace DAO
{
    public class Sach : Interface
    {
        public DataTable Load()
        {
            string s = Application.StartupPath;
            Provider prv = new Provider("Server=.\\SQLEXPRESS;AttachDbFilename=" + s + "\\QLTV.mdf; Trusted_Connection=Yes;Integrated security=true;User Instance=true");
            DataTable dt = prv.ExecuteStoreProcedure("sp_SelectSach");
            if(dt==null)
            {
                Provider prv1 = new Provider("Server=.\\;AttachDbFilename=" + s + "\\QLTV.mdf; Trusted_Connection=Yes;Integrated security=true;User Instance=true");
                dt = prv1.ExecuteStoreProcedure("sp_SelectSach");
            }
            return dt;
        }
        
    }
}
